package cn.lyh.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

@RestController
@RequestMapping("/order")
public class OrderController {
    public static final String INVOKE_URL = "http://cloud-payment-service:";
    @Resource
    private RestTemplate restTemplate;

    @GetMapping("paymentInfo")
    public String paymentInfo(){
        String a ="";
        a=restTemplate.getForObject(INVOKE_URL+"8006/payment/consul",String.class);
        return a;
    }
}
